<template>
	<view class="productList">
		<view>{{product.title}}</view>
		<view>作者:{{product.author}}</view>
		<view>时间:{{product.createTime}}</view>
		<view>概述:{{product.summary}}</view>
		<image :src="product.coverImg"></image>
		<view v-html="product.content1"></view>
	</view>
</template>

<script>
	import {
		productArticle
	} from "@/api/find/index.js"
	export default {
		data() {
			return {
				product:{},
			};
		},
		onLoad(id) {
			var id = id.id
			console.log(id);
			productArticle(id)
			.then(res =>{
				console.log("文章详情",res);
				this.product =res.data.productArticle
				// 设置动态标题
				uni.setNavigationBarTitle({
					title:this.product.title,
					
				})
				
			})
			
		}
	}
</script>

<style lang="scss" scoped>
	.productList{
		padding: 40rpx;
		// text-align: center;
	}

</style>
